clear 
version 13.1

* Project info
cap project, doinfo
if _rc==198 {
	if c(os)=="Unix" loc master "/home/jperez/AA_Minimum_Wage" 
 else if c(username)=="J16339" loc master "B:\Col_Minimum_Wage"
  else if c(username)=="A15858" loc master "B:\Col_Minimum_Wage"
	else loc master "C:/Users/jorpp/Dropbox (Brown)/Col_Minimum_Wage"
	loc pr=0
}
else {
	local master "`r(pdir)'"
	local doname "`r(dofile)'" 
	* Project calls
	project, uses("`master'/Data/Source/ocupados_mw.dta")
	* Call programs
	project, relies_on("`master'/Code/Est/sample_choice.do")
	project, relies_on("`master'/Code/Est/build_mw_measures.do")
	project, relies_on("`master'/Code/Est/build_treatment.do")
	loc pr=1
}
*/


* Call necessary programs. I do not call using project to carry the programs around. I do not put these in the ado/personal folder because they are specific to the project. They are not ado files.
do "`master'/Code/Est/sample_choice.do"
do "`master'/Code/Est/build_mw_measures.do"
do "`master'/Code/Est/build_treatment.do"

* Draw graphs for formal sector
use "`master'/Data/Source/ocupados_mw.dta", clear
mysample rif4sample , hmin(30) hmax(50) sex(0) edadm(65) wage(salario) formal exind(13,29,42)

mw_measures rif4sample , stub(rif4)
keep if rif4sample
keep if time==tq(1998q4)
su bite_rif4_ind [w=fex]

glo mean=r(mean)

di $mean*0.0034
* 2.9%

di 2.9/6.75

* Draw graphs for informal sector
use "`master'/Data/Source/ocupados_mw.dta", clear
mysample rif10sample , hmin(30) hmax(50) sex(0) edadm(65) wage(salario) informal exind(13,29,42)

mw_measures rif10sample , stub(rif10)
keep if rif10sample
keep if time==tq(1998q4)

su bite_rif10_ind [w=fex]
glo mean=r(mean)

di ($mean/10)*0.0013

* 1.35%

di 1.35/6.75


